Repository navigation
fix(app-shell): a screen-flow wizard step toasts "Saved — next step" only when it saved a record - #26656
Merged
Conversation
…only when it saved a record A flat step that only collected input no longer toasts between screens; an object-form step, which persisted its record, keeps the toast. The terminal toasts are unchanged. The step button keeps Submit: the paused screen carries no final-step signal, recorded in the FlowRunner header. Claude-Session: https://claude.ai/code/session_01QsR2jQzKBjxZXgyVnom2V3 Co-authored-by: Claude <noreply@anthropic.com>
…ween flat screens Claude-Session: https://claude.ai/code/session_01QsR2jQzKBjxZXgyVnom2V3 Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Oct 27, 2026
Contributor
Author
席位核对ACCEPT · seat
Landing: no contract review owed (no published schema, no governed text, Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steedos · project thread
Part of #26578. This lands the toast half; the step-button half stays open on the card, because it needs a signal the wire does not carry (see Acceptance notes).
Clause-②: no
Metadata-protocol: none
维护者速读
object-form步骤(它真的保存了一条记录)还弹。流程结束时的提示不变。FlowRunner.tsx的一个分支,纯前端文案行为;回滚即 revert 本 PR。ui/packages/app-shell/src/views/FlowRunner.tsx(resumeWith的savedRecord参数与 paused 分支),FlowRunner.betweenStepsToast-26578.test.tsx,FlowRunner.actionSuccessMessage-12234.test.tsx的改动。pnpm --dir ui exec vitest run packages/app-shell/src/views/__tests__/FlowRunner,预期 15 个文件、94 个测试全绿。What changes
FlowRunner'sresumeWithtakes asavedRecordflag. The flat-field Submit passesfalse; theobject-formsave callback passestrue.paused, theflowRunner.nextSteptoast ("Saved — next step") fires only whensavedRecordis true. A flat step that only collected variables now advances to the next screen with no toast. Anobject-formstep keeps it:ObjectFormcallsonSuccessonly after its write lands, and passingonSuccesssilences the form's own confirmation, so this toast is the user's only one.successMessage, the flow's, the catalog sentence), the refused and failed paths, and the step button are unchanged.Why
Reported on hotclm's five-step contract wizard: every step toasted 「已保存 — 下一步」, including steps that saved nothing, so a requester believed the contract was submitted on step 1.
Tests
FlowRunner.betweenStepsToast-26578.test.tsx: a flat step that pauses again toasts nothing; anobject-formstep that pauses again toasts exactlySaved — next step(full call list); a flat step that ends the run still gets the completion toast.FlowRunner.actionSuccessMessage-12234.test.tsx: its multi-step pin asserted the old between-steps toast on flat screens; it now asserts the action message alone, and its docblock says why.Acceptance notes
ScreenSpecinpackages/spec/src/contracts/automation-service.ts) carriesnodeId,title,description,fields,kind,objectName,mode,recordId,defaultsandidVariable, and no final-step or step-count member. The engine's screen executor (packages/services/service-automation/src/builtin/screen-nodes.ts) emits exactly those. A flow can branch after any screen, so only the engine could answer it, from the graph. The only client-side signal is after the fact: a resume that answerspausedproves the previous step was not the last.ScreenSpec(for example, whether any screen node is reachable downstream of this one). That is a contract addition inpackages/spec, so it is reported to the seat rather than built here. An author-declared button label would be a protocol addition, which triage ruled goes back to triage first.Verification
Head
a746e566.FlowRunner suites (ui root, under os-verify-lock)
pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/views/__tests__/FlowRunner→Test Files 15 passed (15),Tests 94 passed (94),VERDICT command-exit 0.Type-check
pnpm --filter @object-ui/app-shell type-check(runstsc --noEmitandtsc -p tsconfig.test.json, the latter covering__tests__) →VERDICT command-exit 0.Ablation (one, on the changed behaviour)
Through
scripts/ablation-replace.mjs: anchorif (savedRecord) toast.success(replaced byif (savedRecord || true) toast.success((anchor 1 → 0, blob1ed20f953095→244560514f7f). Running the new pin file and the 12234 file:Tests 2 failed | 10 passed. The flat-step pin fails ontoast.successcalled once; the 12234 multi-step pin fails with[['已保存 — 下一步'], ['工单已升级']]against[['工单已升级']]. Restored: blob equals HEAD andgit diff HEADis empty. A first attempt used an undeclared identifier in the replacement, which threw instead of toasting; it was discarded as invalid.Derived gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 34 commands, each run with its exit code recorded.--ranata746e566:34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN; every exit code 0. The uiscripts/suite in that list:Test Files 178 passed | 2 skipped (180).pnpm check:new-line-citations(ui):0 new citation(s).Generated by Claude Code